﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Person/Person.Master" AutoEventWireup="true"
    CodeBehind="HouseList.aspx.cs" Inherits="ZF.BLL.Person.HouseList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="location   mt10_">
        您现在的位置：<a href="/person/index.aspx">会员中心</a> >> <a href="<%=this.Request.Url %>">房源信息</a>
    </div>
    <div>&nbsp;</div>
    <!--自定义条件 开始-->
    <div class="tabHeadMenu">
        <a href="HouseList.aspx?days=7" class='<%=(DealType==-1 && IsBoutique==0)?"action":"" %>'>全部房源</a> <a
            href="HouseList.aspx?dt=1&days=7" class='<%=(DealType==1)?"action":"" %>'>整租房源</a>
        <a href="HouseList.aspx?dt=2&days=7" class='<%=(DealType==2)?"action":"" %>'>合租房源</a>
        <a href="HouseList.aspx?dt=3&days=7" class='<%=(DealType==3)?"action":"" %>'>二手房源</a>
        <a href="HouseList.aspx?dt=4&days=7" class='<%=(DealType==4)?"action":"" %>'>一手房源</a>
       <%-- <a href="HouseList.aspx?jp=1" class='<%=(IsBoutique==1)?"action":"" %>'>精品楼盘</a>--%>
    </div>
    <!--自定义条件 结束-->
    <!--列表 开始-->
    <div class="tabContainer">
        <zf:GridView ID="gvList" runat="server" OnSorting="gvListSorting" OnPageIndexChanging="gvListPageChanging">
            <Columns>
                <zf:TemplateField IsKeyField="true" DefaultSortField="true" DefaultSortDirection="Descending" SortExpression="House.HouseId">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="KeyLabel" Text='<%# Eval("House.HouseId")%>'></asp:Label>
                    </ItemTemplate>
                </zf:TemplateField>
                <zf:TemplateField IsCheckField="true">
                </zf:TemplateField>
                <zf:TemplateField IsSerialNoField="true">
                </zf:TemplateField>
                <zf:TemplateField HeaderText="房源编号" DefaultSortDirection="Ascending" SortExpression="House.HouseId">
                    <ItemTemplate>
                        <%#  10000+(int)Eval("House.HouseId")%>
                    </ItemTemplate>
                </zf:TemplateField>
                <zf:TemplateField HeaderText="发布日期" DefaultSortDirection="Ascending" SortExpression="House.AddTime">
                    <ItemTemplate>
                        <%# ((DateTime) Eval("House.AddTime")).ToShortDateString()%>
                    </ItemTemplate>
                </zf:TemplateField>
                <zf:TemplateField HeaderText="区域">
                    <ItemTemplate>
                        <%# Eval("City")%><%# Eval("Area") == null ? "" : string.Format("({0})", Eval("Area")) %>
                    </ItemTemplate>
                </zf:TemplateField>
                <zf:TemplateField HeaderText="物业名称">
                    <ItemTemplate>
                        <%# Eval("House.Title")%>
                    </ItemTemplate>
                </zf:TemplateField>
                 <zf:TemplateField HeaderText="物业类型"  >
                    <ItemTemplate>
                        <%# Eval("HouseType")%>
                    </ItemTemplate>
                </zf:TemplateField>
                 <zf:TemplateField HeaderText="房型" >
                    <ItemTemplate>
                        <%# Eval("HouseModel")%>
                    </ItemTemplate>
                </zf:TemplateField>
                <zf:TemplateField HeaderText="价格" >
                    <ItemTemplate>
                        <%# Eval("Price")%>
                    </ItemTemplate>
                </zf:TemplateField>
                 <zf:TemplateField HeaderText="联系人">
                    <ItemTemplate>
                        <%# Eval("House.Contact")%>
                    </ItemTemplate>
                </zf:TemplateField>
               <%--  <zf:TemplateField HeaderText="联系人">
                    <ItemTemplate>
                        <%# GetStatus((int) Eval("House.Status"))%>
                    </ItemTemplate>
                </zf:TemplateField>--%>
                
                <zf:TemplateField HeaderText="操作">
                    <ItemTemplate>
                         <a href='/house/houseInfo.aspx?hid=<%# Eval("House.HouseId")%>' target="_blank">
                                查看</a> | <a href='HouseManage.aspx?ot=Edit&hid=<%# Eval("House.HouseId")%>'>
                                    修改</a> |
                        <zf:LinkButton ID="LinkButton1" runat="server" OnClick="Delete" CommandArgument='<%# Eval("House.HouseId") %>'
                            OnClientClick="return confirm('是否确定要删除此记录');">删除</zf:LinkButton>
                    </ItemTemplate>
                </zf:TemplateField>
            </Columns>
        </zf:GridView>
    </div>
    <!--列表 结束-->
    <div class="mt5_ fc_">
    </div>
    <!--自定义按钮 开始-->
    <div class="btnContainer mt10_">
        <span class="fl_ mr10_">
            <input type="checkbox" class="checkAll" bind=".tab" />选中本页显示的所有记录</span>
        <zf:LinkButton ID="LinkButton1" runat="server" OnClick="Delete" CommandArgument='select'
            OnClientClick="return confirm('是否确定要删除选中记录');">删除选中的记录</zf:LinkButton>
        <a href="/house/HousePub.aspx?ot=AddNew&dt=1" target="_blank">发布出租房源</a>
        <a href="/house/HousePub.aspx?ot=AddNew&dt=3" target="_blank">发布二手房源</a>
        <a href="/house/HousePub.aspx?ot=AddNew&dt=4" target="_blank">发布一手房源</a>
    </div>
    <!--自定义按钮 结束-->
    <div class="fc_ mt10_">
    </div>
    <!--搜索 开始-->
    <div class="searchContainer dn_">
        <table>
            <tr>
                <td class="l">
                    搜索选项:
                </td>
                <td class="m">
                    <div class="c">
                        <span class="t">物业名称:</span><span class="c">
                            <zf:TextBox runat="server" class="stxt" ID="tbTitle"></zf:TextBox></span>
                        <span class="t">物业类型:</span><span class="c">
                            <zf:DropDownList runat="server" ID="ddlHouseType" class="stxt" AppendDataBoundItems="true">
                                <asp:ListItem Value="-1" Text="未选择"></asp:ListItem>
                            </zf:DropDownList>
                        </span><span class="t">&nbsp;&nbsp;发布时间(小于):</span><span class="c">
                            <zf:TextBox runat="server" class="dttxt" ID="tbEndTime1" onfocus="calendar();"></zf:TextBox></span>
                        <br />
                        <span class="t">客户编号:</span><span class="c">
                            <zf:TextBox runat="server" class="stxt" ID="tbHouseNo"></zf:TextBox></span>
                        <span class="t">房源状态:</span><span class="c">
                            <zf:DropDownList runat="server" ID="ddlHouseStatus" class="stxt" AppendDataBoundItems="true">
                                <asp:ListItem Value="-1" Text="未选择"></asp:ListItem>
                                 <asp:ListItem Value="1" Text="发布中"></asp:ListItem>
                                  <asp:ListItem Value="2" Text="停止发布"></asp:ListItem>
                                   <asp:ListItem Value="3" Text="已交易"></asp:ListItem>
                            </zf:DropDownList>
                        </span><span class="t">&nbsp;&nbsp;发布时间(大于):</span><span class="c">
                            <zf:TextBox runat="server" class="dttxt" ID="tbEndTime2" onfocus="calendar();"></zf:TextBox></span>
                        <zf:Button runat="server" ID="Button2" Text="搜 索" OnClick="Search" class="linkbtn" />
                        <zf:Button runat="server" ID="Button1" Text="全 部" OnClick="AllList" class="linkbtn" />
                    </div>
                </td>
            </tr>
        </table>
    </div>
    <!--搜索 结束-->
</asp:Content>
